package br.com.mundoj.subscription.client.events;

import br.com.mundoj.subscription.client.FormattedString;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class SearchAddressByCepEvent extends GwtEvent<SearchAddressByCepEvent.Handler> {
	public interface Handler extends EventHandler {
		void onEvent(SearchAddressByCepEvent e);
	}

	public static final Type TYPE = new Type();
	
	public final FormattedString formattedCep;

	public SearchAddressByCepEvent(FormattedString formattedCep) {
		this.formattedCep = formattedCep;
	}

	@Override
	protected void dispatch(Handler handler) {
		handler.onEvent(this);
	}

	@Override
	public Type getAssociatedType() {
		return TYPE;
	}
}